<?php if($data){ ?>
			<table width = "795" cellpadding = "2" cellspacing = "2" border = "0" align = "center" bgcolor = "#D4D0C8">
			<tr> <th colspan = "7"> CHI TIẾT NHẬP </th> </tr>
			<tr class = "list"> 
				<td width = "150" valign = "top"> <div align = "center"> <b> Nhà cung cấp </b> </div> </td>
				<td width = "150" valign = "top"> <div align = "center"> <b> Mặt hàng  </b> </div> </td>
				<td width = "150" valign = "top"> <div align = "center"> <b> Đơn giá nhập  </b> </div> </td>
				<td width = "150" valign = "top"> <div align = "center"> <b> Số lượng </b> </div> </td>
				<td width = "150" valign = "top"> <div align = "center"> <b> Ngày nhập  </b> </div> </td>
				<td width = "80" valign = "top"> <div align = "center"> <img src="public/images/b_edit.png"/> Sữa</div> </td>
				<td width = "80" valign = "top"> <div align = "center"> <img src="public/images/b_drop.png"/> Xóa </div> </td>
			</tr>
		<?php foreach ($data['list'] as $key => $value) { ?>
			<tr> 
				<td width = "150" valign = "top"> <div align = "center">
					<?php 
						if(is_array($data['listhang'])){
							foreach ($data['listhang'] as $item){
								if($item['MaNCC'] == $value['MaNCC']){
									echo $item['TenNCC'];
								}
							}
						}
					?>
				</div> </td>
				<td width = "150" valign = "top"> <div align = "center">
					<?php 
						if(is_array($data['listmathang'])){
							foreach ($data['listmathang'] as $item){
								if($item['MaMH'] == $value['MaMH']){
									echo $item['TenMH'];
								}
							}
						}
					?>
				</div> </td>
				<td width = "150" valign = "top"> <div align = "center"><?php echo $value['DonGiaNhap']?></div> </td>
				<td width = "150" valign = "top"> <div align = "center"><?php echo $value['SoLuongNhap'];?></div> </td>
				<td width = "150" valign = "top"> <div align = "center"><?php echo $value['NgayNhap'];?></div> </td>
				<td width = "80" valign = "top"> <div align = "center"> <a href = "admin.php?mod=edit_ctnhap&ma=<?php echo $value['MaCTN'];?>"> Sữa </a></div> </td>
				<td width = "80" valign = "top"> <div align = "center"> <a href = "admin.php?mod=del_ctnhap&ma=<?php echo $value['MaCTN'];?>"> Xóa </a> </div> </td>
			</tr>
		<?php } ?>
		</table>
<?php } ?>